An imaging device 10, as shown in FIG. 1, typically includes a plurality of imaging device pixel cells, each having an associated photosensor, arranged in an array 20. FIG. 1 illustrates a CMOS imaging device 10 which employs a column parallel readout to sample the signals generated by the imaging device pixel cells. In a column parallel readout, a column switch associated with a column driver 60 and associated column address decoder 70 for each column of the array selectively couples a column output line to a readout circuit while a row of the array is selected for readout by row address decoder 40 and row driver 30.
A control circuit 50 typically controls operation of the pixel cells of the array 20 for image charge integration and signal readout. Each imaging device pixel cell in a CMOS imaging device 10 is sampled for a reset output signal (Vrst) and a photogenerated voltage output signal (Vsig) proportional to incident light from a scene to be captured. The output signals are sent to the readout circuit which processes the imaging device pixel cell signals. The readout circuit typically includes a sample and hold circuit 72 for sampling and holding the reset output signal Vrst and photogenerated output signal Vsig, a differential amplifier 74 for subtracting the Vrst and Vsig signals to generate a pixel output signal (e.g., Vrst−Vsig), and an analog-to-digital converter (ADC) 77, which receives the analog pixel output signal and digitizes it. The output of the analog-to-digital converter 77 is supplied to an image processor 110, which processes the pixel output signals from array 20 to form a digital image.
A color filter array may be used to detect separate color components of a scene to be captured so that the imaging device 10 may successfully reflect color details in a digitally produced color image. When a color filter array is placed over the pixel array 20, each imaging device pixel cell receives light through a respective color filter of the color filter array and detects only the color of its associated filter.
A Bayer patterned color filter array 80, illustrated in FIG. 2, is a well known and commonly used color filter array that allows the passage of only red, green, or blue light. Imaging device pixels in an array 20 associated with a Bayer patterned color filter array 80 may be designated as red (R), green (G), or blue (B) pixels according to each pixel's associated filter. Color filters in a Bayer patterned color filter array 80 are arranged in a pattern of alternating rows 90, 95, 90, 95, etc., with each row having alternating colors, i.e., R,G,R,G,R,G, etc. in rows 90 and G,B,G,B,G, etc. in rows 95.
The digital image output of the imaging device 10 using a Bayer patterned color filter array 80 is initially an array of red, green and blue image pixels, where “pixels” refers to individual picture elements that together comprise a digital image. Each pixel value is proportional to the intensity of the respective incident light from the captured scene as received by the imaging device pixel cell through an associated filter. This initial red/green/blue image is referred to as a “raw” image. A number of image processing tasks are required to transform a raw image into an image of a quality that accurately reflects the target scene by human visual standards.
Spatial processing tasks are a type of processing applied to raw image data which acquires pixel values from several pixels in a row or column of an image. Spatial processing includes color mosaic interpolation (i.e., demosaicing), pixel defect correction, image contrast enhancement, and image noise reduction, among other processing tasks. These tasks generally require the use of a plurality of line buffers to store lines of pixel values of the image so that proximal pixel values may be used in various processing calculations. Typically, the line buffers sequentially receive and store lines of pixel values in an image and these pixel values are processed while in the line buffer. Process lines of pixels exit each line buffer as a new next line of unprocessed pixel values are stored.
A line buffer stores a complete row or column of pixel values. Typically, as many as five or more separate line buffers may be used in spatial processing tasks. In a “camera-on-a-chip”implementation, the number of buffers occupies a significant portion of the silicon area used in the chip, which can be a problem due to cost and space limitations.
It is desirable to reduce the required number of line buffers for spatial processing tasks. It is also desirable for the spatial processing tasks to be efficient, low-cost and simple. What is needed is a spatial processing method that requires fewer line buffers and provides increased efficiency and decreased complexity of the spatial processing operations used to achieve, for example, defective pixel correction, interpolation, contrast enhancement and noise reduction.